{% extends "base.html" %}
{%block title%}{{item.name}}{%endblock%}
{% load comments %}
{% block content %}
<h3>{{item.name}}</h3>
<div class="span-16 last">
	<div class="span-9 colborder">
	    <img src="{{item.image.url}}" alt="{{item.name}}" class="span-9"/>
	</div>
	<div class="span-6 last">
	    <h4>属性:</h4>
	    <ul>
	        {% for prop in item.property_set.all %}
	        <li>{{prop.name}}:{{prop.value}}</li>
	        {% endfor %}
	    </ul>
	</div>
</div>
<div>
<h4>说明:</h4>
{{item.description}}
</div>
<div>
<h4>评论</h4>
{% get_comment_count for item as comment_count %}
目前已有{{comment_count}}条评论:
{% get_comment_list for item as comment_list %}
{% for comment in comment_list %}
    <div class="box">
    <p>{{comment.comment}}</p>
    </div>
{% endfor %}

{% render_comment_form for item %}
</div>
{% endblock %}